package com.bobamrz.frontend;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.bobamrz.domain.DocType;
import com.bobamrz.service.CatalogueService;
import com.bobamrz.service.DocTypeService;

public class HeaderAndMenuDataLoader {
	
	public void load(HttpServletRequest request) {
		DocTypeService docTypeService = new DocTypeService();
		List<DocType> superDocTypes = docTypeService.getAvailableSuperDocTypes();
		request.setAttribute("availablSuperDocTypes", superDocTypes);
		
		CatalogueService catalogService = new CatalogueService();
		String catalogsHtml = catalogService.getCatalogTreeHtml();
		request.setAttribute("catalogsHtml", catalogsHtml);
	}

}
